<!DOCTYPE html>
<html>
    <head lang="en">
        <meta charset="UTF-8">
        <meta name="csrf-token" content="{{ csrf_token() }}">
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">	
        <link rel="shortcut icon" type="image/x-icon" href="{{URL::asset('handan/images/logo-icon.png')}}" />
        <title>客户个人中心</title>
        <link rel="stylesheet" href="{{URL::asset('mobile/css/public.css') }}"/>
        <link rel="stylesheet" type="text/css" href="{{URL::asset('newmobile/css/customer.css') }}"/>
        <script src="{{URL::asset('public_js/jquery-3.2.1.min.js')}}"></script>
		<script src="{{URL::asset('mobile/js/public.js') }}"></script>
		<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"> </script>
    </head>
<body>
<!-- header start -->	
<header>
	<div>
		<div><img src="{{session('eai')['photo']}}" alt="" /></div>
		<p>{{ $userinfo->username}}
			@if($userinfo->isvip != '0')
			<img src="{{URL::asset('newmobile/image/huiyuan.png') }}" alt="" /></p>
			@endif
		<p class="countdown">
			<span>会员剩余</span>
			<span>24天12时40分</span>
		</p>
	</div>
	<div class="xiaoxi">
		<img src="{{URL::asset('newmobile/image/xiaoxi.png') }}" alt="" />
	</div>
</header>
<!-- header end -->
<!-- SHOWDATA start -->	
<section>
	<div>
		<span>{{$mobgendaninfo[0]}}</span>
		<span>{{$mobgendaninfo[2]}}</span>
		<span>{{$mobgendaninfo[1]}}</span>
	</div>
	<div>
		<span>总收益</span>
		<span onclick="window.location.href='{{URL::asset("/chicang")}}'">订阅分析师</span>
		<span>总单量</span>
	</div>
</section>
<!-- SHOWDATA end -->
<!-- TWO start -->
<div class="showTwo">
	<a href="javascript:;">
		<div>{{$mobgendaninfo[3]}}</div>
		<div>本周收益</div>
	</a>
	<a href="{{url('/kgendan?id=')}}{{$id}}">
		<div><img src="{{URL::asset('newmobile/image/jilu.png') }}" alt="" /></div>
		<div>订阅记录</div>
	</a>
	<a href="{{url('/newhistoryfollow?id=')}}{{$id}}">
		<div><img src="{{URL::asset('newmobile/image/lishidingyue.png') }}" alt="" /></div>
		<div>历史订阅</div>
	</a>
</div>
<div class="showTwo" style="margin-bottom:0.42666667rem;">
	<a href="{{url('/dataFenXi?id=')}}{{$id}}">
		<div><img src="{{URL::asset('newmobile/image/shujufengxi.png') }}" alt="" /></div>
		<div>数据分析</div>
	</a>
	<a href="javascript:;">
		<div><img src="{{URL::asset('newmobile/image/lainxiwomen.png') }}" alt="" /></div>
		<div>联系客服</div>
	</a>
	<a href="javascript:;">
		<div><img src="{{URL::asset('newmobile/image/bangzhuzhongxin.png') }}" alt="" /></div>
		<div>帮助中心</div>
	</a>
</div>
<!-- TWO end -->
<!-- setting start -->
<div class="setting" onclick="setup()">
	<span>
		<img src="{{URL::asset('newmobile/image/shezhi.png') }}" alt="" />设置
	</span>
	<span>
		<img src="{{URL::asset('newmobile/image/zhankai.png') }}" alt="" />
	</span>
</div>
 
<div class="setting" style="margin-top:0.2rem;">
 	<span>
 		<img src="{{URL::asset('newmobile/image/guanyuwomen.png') }}" alt="" />关于我们</span>
 	<span>
 		<img src="{{URL::asset('newmobile/image/zhankai.png') }}" alt="" /></span>

 </div>
<!-- setting end -->
<!-- bottom start -->
<div style="height: 5rem;"></div>
@include('newmobile.footer')
<!-- bottom end -->
</body>
</html>
<style>
	/*底部行情应用样式*/
	footer ul li:nth-child(4) a {
		color: #3B9CE0;
	}
	footer ul li:nth-child(4) a i {
		display: block;
		background: url("{{URL::asset('mobile/image/news_icond.png') }}") no-repeat center/cover;
	}
</style>
<script>
	function detail(userid) {
		var myhandan = '{{ url("/kmyhandan") }}';
		window.location.href = myhandan+"?userid="+'{{$_GET["id"]}}';
	}
	// 设置
	function setup() {
		var myhandan = '{{ url("/setup") }}';
		window.location.href = myhandan+"?id="+'{{$_GET["id"]}}';
	}
	//会员倒计时
	daojishi();
	function daojishi() {
		clearInterval(timer);
		var timer = null,
			endtime = '{{$userinfo->expire_time}}',//到期时间
		    istiyan = '{{$userinfo->hasapply}}';//是否体验过
		var nowtime = Date.parse(new Date());
		if(!endtime){
			clearInterval(timer);
			$('.countdown').html('');
		}else if((endtime*1000) < nowtime){
			clearInterval(timer);
			$('.countdown').html('您的会员已到期');
		}else{
			var leftTime = (endtime * 1000 - nowtime) / 1000;
			var day = Math.floor(leftTime / 60 / 60 / 24); //计算剩余的天数
			var hours = Math.floor(leftTime / 60 / 60 % 24); //计算剩余的小时
			var minutes = Math.floor(leftTime / 60 % 60);//计算剩余的分钟
			var seconds = Math.floor(leftTime % 60);//计算剩余的秒数
			msg = '<span>会员剩余</span><span>'+day + "天"  + hours + "时"+ minutes + "分"+seconds+"秒</span>";
			$('.countdown').html( msg);
			timer = setInterval("daojishi()", 1000);
		}
	}
	wx.ready(function () {
		var title = '个人中心';
		var desc  = '让交易变得更智能';
		var link  = '{{ url("/home") }}?id='+'{{$_GET["id"]}}';
		var imgurl = 'http://www.eaifx.com/index/images/minbanner.png';
		// 监听“分享给朋友”，按钮点击、自定义分享内容及分享结果接口
		wx.onMenuShareAppMessage({
			title: title,
			desc: desc,
			link: link,
			imgUrl: imgurl,
			trigger: function (res) {
				// 不要尝试在trigger中使用ajax异步请求修改本次分享的内容，因为客户端分享操作是一个同步操作，这时候使用ajax的回包会还没有返回
//					alert('用户点击发送给朋友');
			},
			success: function (res) {
				alert('已分享');
			},
			cancel: function (res) {
				alert('已取消');
			},
			fail: function (res) {
//                alert(JSON.stringify(res));
				alert('分享失败');
			}
		});

		// 监听“分享到朋友圈”按钮点击、自定义分享内容及分享结果接口
		wx.onMenuShareTimeline({
			title: title,
			link: link,
			imgUrl: imgurl,
			trigger: function (res) {
				// 不要尝试在trigger中使用ajax异步请求修改本次分享的内容，因为客户端分享操作是一个同步操作，这时候使用ajax的回包会还没有返回
//					alert('用户点击分享到朋友圈');
			},
			success: function (res) {
				alert('已分享');
			},
			cancel: function (res) {
				alert('已取消');
			},
			fail: function (res) {
				alert(JSON.stringify(res));
			}
		});

		// 监听“分享到QQ”按钮点击、自定义分享内容及分享结果接口
		wx.onMenuShareQQ({
			title: title,
			desc: desc,
			link: link,
			imgUrl: imgurl,
			trigger: function (res) {
//					alert('用户点击分享到QQ');
			},
			complete: function (res) {
//					alert(JSON.stringify(res));
			},
			success: function (res) {
				alert('已分享');
			},
			cancel: function (res) {
				alert('已取消');
			},
			fail: function (res) {
				alert(JSON.stringify(res));
			}
		});

		// 监听“分享到微博”按钮点击、自定义分享内容及分享结果接口

		wx.onMenuShareWeibo({
			title: title,
			desc: desc,
			link: link,
			imgUrl: imgurl,
			trigger: function (res) {
//					alert('用户点击分享到微博');
			},
			complete: function (res) {
//					alert(JSON.stringify(res));
			},
			success: function (res) {
				alert('已分享');
			},
			cancel: function (res) {
				alert('已取消');
			},
			fail: function (res) {
				alert(JSON.stringify(res));
			}
		});

		// 监听“分享到QZone”按钮点击、自定义分享内容及分享接口
		wx.onMenuShareQZone({
			title: title,
			desc: desc,
			link: link,
			imgUrl: imgurl,
			trigger: function (res) {
//					alert('用户点击分享到QZone');
			},
			complete: function (res) {
//					alert(JSON.stringify(res));
			},
			success: function (res) {
				alert('已分享');
			},
			cancel: function (res) {
				alert('已取消');
			},
			fail: function (res) {
				alert(JSON.stringify(res));
			}
		});
	});
</script>
    	
